#version 330 core
layout (location = 0) in vec3 aPos; //位置坐标
layout (location = 1) in vec3 aNormal; //法向量
layout (location = 2) in vec2 aTexCoords; //纹理
out vec3 Normal; //输出
out vec3 FragPos;
out vec2 TexCoords;
uniform mat4 objectModel;
uniform mat4 view;
uniform mat4 projection;

void main()
{
	gl_Position = projection * view * objectModel * vec4(aPos, 1.0); //变换
	Normal = aNormal;
	FragPos = vec3(objectModel * vec4(aPos, 1.0)); //顶点位置属性乘以模型矩阵（不是观察和投影矩阵）来把它变换到世界空间坐标
	TexCoords = aTexCoords;

}